<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>javascript</title>
    <style></style>
    <!-- <link rel="stylesheet" href="x.css"> -->
    <!-- <script>
        // alert('我在学习js')

        console.log('JavaScript')
        console.log('first')
    </script> -->
    <script>
        // 页面js代码
    </script>
    <script src="js/demo.js">
        // 外部js的script标签里不要写代码
    </script>
</head>
<body>

    <script>
        // js是动态、弱类型语言
        var num = 'abc';
        console.log(typeof num)
        num = 1000;
        console.log(typeof num)

        var str;
        console.log(str)
        console.log(typeof str)

        var arr = [100,200,300]
        console.log(arr[5])//undefined

        // for(var i=0; i<num; i++){
        //     document.write('<h1>'+i+'</h1>')
        // }
    </script>
</body>
</html>